Developer --> Technical Publications
PATH Hardware Documentation > Device Managers and Drivers > ATA Devices > ATA Device Software Guide


ATA_MgrInquiry

The ATA_MgrInquiry function gets information, such as the version number, about the ATA Manager.

The ataPIOMaxMode , ataSingleDMAModes , and ataMultiDMAModes fields of the ATA_MgrInquiry function are obsolete in ATA Manager version 4.0 and later. The services provided in these fields have been moved to the ATA_BusInquiry function. This change aligns better with the services required to support different modes (polled I/O or DMA) on multiple ATA buses, which ATA Manager 4.0 and later provide. An example of a Macintosh computer that has multiple ATA buses requiring different mode support is the PowerBook 3400. It supports PCMCIA ATA devices requiring PIO data transfer on one ATA bus and an internal ATA drive that supports DMA transfers on the other ATA bus.

The manager function code for the ATA_MgrInquiry function is $90.

The parameter block associated with this function is defined below:

typedef struct /* ATA inquiry structure */
{
ataPBHdr /* ataPBHdr parameter block */
NumVersion MgrVersion /* Version of ATA Manager */
UInt8 MGRPBVers; /* <-- Manager PB version */
/*number supported */
UInt8 Reserved1; /* Reserved */
UInt16 ataBusCnt; /* <-- Number of ATA buses in */
/*system */
UInt16 ataDevCnt; /* <-- Number of ATA devices
detected */
UInt8 ataPIOMaxMode; /* <-- Maximum PIO speed mode */
UInt8 Reserved2; /* Reserved */
UInt16 Reserved3; /* Reserved */
UInt8 ataSingleDMAModes; /* <-- Singleword DMA modes */
/*supported */
UInt8 ataMultiDMAModes; /* <-- Multiword DMA modes */
/*supported */
UInt16 Reserved[16]; /* Reserved */
} ataMgrInquiry;

Field descriptions

ataPBHdr
See the definition of the ataPBHdr parameter block.
MgrVersion
On return, this field contains the version number of the ATA Manager present in the system.
MGRPBVers
This field contains the number corresponding to the latest version of the parameter block supported by the current ATA Manager. A client may use any ataPBHdr parameter block definition up to this version.
Reserved
Reserved. All reserved fields are set to 0 for future compatibility.
ataBusCnt
On return, this field contains the total number of ATA buses in the system. This field contains a zero if the ATA Manager has not been initialized. Not all ATA buses reported may be active. However clients should allocate adequate data storage to handle up to the reported number of busses/channels.
ataDevCnt
On return, this field contains the total number of ATA devices detected on all ATA buses. The current architecture allows only one device per bus. This field contains a zero if the ATA Manager has not been initialized. With media bay and PCMCIA sockets, the value reported may change depending on the configuration at the time.
ataPIOMaxMode
This field specifies the maximum PIO speed mode that the ATA Manager supports. Refer to the ATA-2 specification for information on mode timing. For additional information about the individual bus capabilities, see the description of the ATA_BusInquiry function.
ataSingleDMAModes
This bit-significant field specifies the maximum DMA mode that the ATA Manager can support. The least-significant bit indicates support for Single Word DMA transfer mode 0. Refer to the ATA-2 specification for information on DMA mode timing.
ataMultiDMAModes
This bit-significant field specifies the Multiword DMA transfer modes that the manager can support. The least-significant bit indicates support for Multiword DMA transfer mode 0. Refer to ATA-2 specification for information on DMA mode timing.
Reserved[16]
This field is reserved. To ensure future compatibility, all reserved fields should be set to 0.

Some early Macintosh computer ROMs indicate that the ATA Manager is present without actually having the proper hardware to support ATA devices. When this happens it is possible to halt the system. It is always best to inquire as to whether the computer has ATA hardware before detecting the presence of the ATA Manager. The following prototype code shows how to detect the ATA Manager properly.

Boolean ATAManagerPresent(void)
{
    UInt16 configFlags;
    Boolean ATAIsHere = true;

    configFlags = LMGetHWCfgFlags();

    if (!(configFlags & 0x0080))
        ATAIsHere = false;
        /* see Inside Macintosh Volume VI chapter 3 for */
        /* defintion of TrapAvailable */
    if (ATAIsHere && TrapAvailable(kATATrap))
        ATAIsHere = true;
    return ATAIsHere;
}
RESULT CODES

See Table A-1 for possible result codes returned by the ATA Manager.


© 1999 Apple Computer, Inc. — (Last Updated 30 Oct 97)

Previous | Back Up One Level | Next | Show Frames | Hide Frames